﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Entity;
using BAL;
using Common;
namespace Web
{
    public partial class ReportExamList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string studentId = HttpContext.Current.Session["QueryStudentId"] as string;
                IList<int> ids = HttpContext.Current.Session["QueryExamRoomId"] as List<int>;
                if (studentId != null && ids != null)
                {

                    StringBuilder sb = new StringBuilder();
                    IList<ExamRoomInfo> examroomInfos = ExamRoom.GetT1s(ids);
                    if (examroomInfos.Count > 0)
                    {
                        foreach (ExamRoomInfo examroomInfo in examroomInfos)
                        {
                            sb.Append("<div class='formdiv'><a href='ChartScoreMain.aspx?examroomid=" + examroomInfo.Id + "' target='_blank'>" + examroomInfo.ExamName + "</a></div>");
                        }
                    }
                    else
                    {
                        sb.Append("<div class='formdiv'>暂无考试记录！</div>");
                    }
                    this.blockcontent.InnerHtml = sb.ToString();
                }
                else
                {
                    this.blockcontent.InnerHtml = "<div class='formdiv'>数据错误</div>";
                }
            }
        }
    }
}
